<template>
  <div>
    <div class="title">
      <van-search
        v-model="value"
        placeholder="请输入商品名或者宝贝标题"
        show-action
        background="-webkit-linear-gradient(left, #FFA500 , #FF4500)"
        shape="round"
      >
        <div slot="action" >
          <van-icon name="shopping-cart-o" size="25px" />
        </div>
      </van-search>
    </div>
    <!-- 搜索栏完成 -->
    <!-- 导航栏 -->
    <van-tabs   @click="onClick" sticky animated  swipeable>
      <van-tab title="精选"><router-view></router-view></van-tab>     
      <!-- 精选模块完成 -->
      <!-- 女装模块开始 -->
      <van-tab title="女装" to="/nvzhuang"><router-view></router-view></van-tab>
      <van-tab title="男装" to="/nanzhuang"><router-view></router-view></van-tab>
      <van-tab title="美食"><router-view></router-view></van-tab>
    </van-tabs>
    
  </div>
</template>

<script>
export default {
  name: "home",
  data() {
    return {
      value:'',
      active:''
    };
  },
  methods: {
    onClick(name, title) {
      //this.$toast(name + '已被禁用');
      console.log(name,title)
      if(name==0){
        this.$router.push('/lunbo')
      }else if(name==1){
        this.$router.push('/nvzhuang')
      }
    }
  },
};
</script>
<style  scoped>
.frist {
  position: absolute;
  right: 0;
}
#tubiao {
  width: 10%;
  height: 30px;
  background: #ffffff;
  text-align: center;
  line-height: 40px;
  padding-top: 10px;
  float: right;
}

.center {
  width: 90%;
  float: left;
}
.datu_top {
  height: 84px;
  background: chartreuse;
}
</style>
